<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加</title>
<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
<script type="text/javascript">
	function buit() {
		var empName = $("#empName").val();
		var dept = $("#dept").val();
		var chkDate = $("#chkDate").val();
		var status = $("#status").val();
		if (empName == "" || dept == "") {
			alert("名字或部门不能为空！");
			return false;
		}
		if (chkDate == "") {
			alert("日期格式不正确！");
			return false;
		}
		if (chkDate == "") {
			alert("请现在考勤类型！");
			return false;
		}
		return true;
	}
</script>
</head>
<body>
	<form action="addServlet" method="post" onsubmit="return buit()">
		<table border="1">
			<tr>
				<th colspan="2" align="center" style="background-color: red;">添加考勤记录信息</th>
			</tr>

			<tr>
				<td>姓名</td>
				<td><input type="text" name="empName" id="empName"></td>
			</tr>
			<tr>
				<td>所属部门</td>
				<td><input type="text" name="dept" id="dept"></td>
			</tr>
			<tr>
				<td>考勤日期</td>
				<td><input type="text" name="chkDate" id="chkDate">日期格式：yyyy-MM-dd</td>
			</tr>
			<tr>
				<td>考勤状态</td>
				<td><select name="status" id="status"><option
							value="">请选择考勤类型</option>
						<option value="正常">正常</option>
						<option value="迟到">迟到</option>
						<option value="外出">外出</option>
						<option value="休假">休假</option>
						<option value="早退">早退</option>
				</select></td>
			</tr>
			<tr>
				<th colspan="2" align="center"><input type="submit" value="登记">
				</th>
			</tr>
		</table>
	</form>
</body>
</html>